package org.apollo.sqlite.sql.sub;

import org.apollo.sqlite.sql.Builder;

public abstract class OrderByConst extends Builder {
    public OrderByConst(StringBuilder sqlBuilder) {
        super(sqlBuilder);
    }

    public abstract OrderByConst desc(String column);

    public abstract OrderByConst asc(String column);

    @Override
    public String build() {
        return super.build();
    }

    @Override
    public String build(boolean format, boolean println) {
        if (sqlBuilder.charAt(sqlBuilder.length() - 1) == ',') {
            sqlBuilder.deleteCharAt(sqlBuilder.length() - 1);
        }
        return super.build(format, println);
    }

    @Override
    public String println() {
        return super.println();
    }

    @Override
    public String format() {
        return super.format();
    }
}
